﻿//-----------------------------------------------------------------------
// <copyright file="BoolToFontWeightConverter.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>22/08/2012</date>
//-----------------------------------------------------------------------
using System;
using System.Windows;
using System.Windows.Data;

namespace ConsoleHoster.View.Converters
{
	public class BoolToFontWeightConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			return (bool)value ? FontWeights.Bold : FontWeights.Normal;
		}

		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			return (FontWeight)value == FontWeights.Bold ? true : false;
		}
	}
}
